﻿<form class="layui-form model-form" id="form1" action="">
    <input name="id" id="id" type="hidden" value="{$info.id|default=0}">
        
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">客户：</label>
            <div class="layui-input-inline">                   
                <input placeholder="请选择客户" class="layui-input" id="selectInput" autocomplete="off" value="{$info['company_name']|default=''}">
                <input type="hidden" name="company_id" id="company_id" value="{$info['company_id']|default=''}">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">签订日期：</label>
            <div class="layui-input-inline">
            
                {date:select param="signing_date|签订日期|date" value="$info['signing_date']|default=date('Y-m-d')"}
            
            </div>
        </div>
        
    </div>
            
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">合同编号：</label>
            <div class="layui-input-inline">
            
                <input name="contract_no" value="{$info['contract_no']|default=''}" lay-verify="required" autocomplete="off" placeholder="请输入合同编号" class="layui-input" type="text">
            
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">合同金额：</label>
            <div class="layui-input-inline">
            
                <input name="amount" value="{$info['amount']|default=''}" lay-verify="required" autocomplete="off" placeholder="请输入合同金额" class="layui-input" type="text">
            
            </div>
        </div>
        
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">收费情况：</label>
            <div style="display:flex;flex-direction: column;">
                <div class="layui-input-inline">
                
                    <!-- {common:select param="type|0|收费情况|username|id" data="0=全款,1=部分款项" value="isset($info['type']) ? $info['type'] : ''"} -->

                    <select name="type" id="type">
                        <option value="" {if condition = "!isset($info.type) || ($info.type == '')"}selected{/if}>请选择收费情况</option>
                        <option value="0" {if condition = "(isset($info.type)) && is_numeric($info.type) && $info.type == 0"}selected{/if}>全款</option>
                        <option value="1" {if condition = "(isset($info.type)) && is_numeric($info.type) && $info.type == 1"}selected{/if}>部分款项</option>
                    </select>
                    
                </div>
                <div id="type_desc" class="layui-input-inline" style="width: 100%;color:gray;;font-size: 15px;">
                        <div style="display:none;">
                            已收部分款项：<input class="type_desc" name="type_remark1_0" autocomplete="off" value="{$info['charge_details'][0]|default=''}"/>
                            其中第一笔到款时间：<input class="type_desc" name="type_remark1_1" autocomplete="off" value="{$info['charge_details'][1]|default=''}" />
                            第二笔到款时间：<input class="type_desc" name="type_remark1_2" autocomplete="off" value="{$info['charge_details'][2]|default=''}"/>
                            第三笔到款时间：<input class="type_desc" name="type_remark1_3" autocomplete="off" value="{$info['charge_details'][3]|default=''}"/>
                        </div>
                        <!-- <div style="display:none">
                            第三方费用:<input class="type_desc"/ name="type_remark2_0" autocomplete="off" value="{$info['charge_details'][0]|default=''}"/>
                        </div> -->
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
                <label class="layui-form-label">第三方费用：</label>
                <div class="layui-input-inline">
                
                    <input name="third_fee" value="{$info['third_fee']|default=''}" lay-verify="" autocomplete="off" placeholder="请输入第三方费用" class="layui-input" type="text">
                
                </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">收费标准：</label>
            <div style="display:flex;flex-direction: column;">
                <div class="layui-input-inline">
                
                    <!-- {common:select param="standard|0|收费情况|username|id" data="0=仅收代理费,1=包含官费" value="isset($info['standard']) ? $info['standard'] : ''"} -->
                    
                    <select name="standard" id="standard">
                        <option value="" {if condition = "!isset($info.standard) || ($info.standard == '')"}selected{/if}>请选择收费情况</option>
                        <option value="0" {if condition = "(isset($info.standard)) && is_numeric($info.standard) && $info.standard == 0"}selected{/if}>仅收代理费</option>
                        <option value="1" {if condition = "(isset($info.standard)) && is_numeric($info.standard) && $info.standard == 1"}selected{/if}>包含官费</option>
                    </select>
                </div>
                <div id="standard_desc" class="layui-input-inline" style="width: 100%;color:gray;;font-size: 15px;">
                        <div style="display:none;">
                            （申请费：<input class="type_desc" name="standard_details_0" autocomplete="off" value="{$info['standard_details'][0]|default=''}" />
                            授权费：<input class="type_desc" name="standard_details_1" autocomplete="off" value="{$info['standard_details'][1]|default=''}"/>）
                        </div>
                </div>
            </div>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">PDF：</label>
        <div class="layui-input-block">
            {upload:file name="pdf|附件|5|pdf|10*1024*1024" 
            fileName="isset($info['pdf']) ? $info['pdf'] : ''" 
            filePath="isset($info['pdf']) ? $info['pdf'] : ''"}
        </div>
    </div>
            
    <div class="layui-form-item" style="width:625px;">
            <label class="layui-form-label">备注：</label>
            <div class="layui-input-block">
                
                <textarea name="remark" class="layui-textarea">{$info['remark']|default=''}</textarea>
            
            </div>
    </div>
        
    <!-- {widget:submit name="submit|立即保存,close|关闭"} -->

</form>
<style>
ul.layui-menu.layui-dropdown-menu {
    max-height: 300px;
    width: 200px;
    overflow-x: hidden;
}
.type_desc{
    width: auto;
    border: none;
    border-bottom: 1px solid black;
    margin-top: 10px;
    color: black;
}
.layui-form-label{
    width: 90px;
}
</style>
